<?php   // $Id: dep_edit_suite.php 251 2008-08-04 22:02:16Z pcoustillas $ ?>
<?php   
/*Copyright (C) 2003-2004 Guy Hendrickx
Licensed under the terms of the GNU  General Public License:http://www.opensource.org/licenses/gpl-license.php
File Authors:Guy Hendrickx
Modification : Pierre Coustillas*/

require_once("include/verif.php");
require_once("include/config/common.php");
require_once("include/utils.php");

$lib=isset($_POST['lib'])?$_POST['lib']:"";
$four=isset($_POST['four'])?$_POST['four']:"";
$prix=isset($_POST['prix'])?$_POST['prix']:"";
$num=isset($_POST['num'])?$_POST['num']:"";
$date=isset($_POST['date'])?$_POST['date']:"";

$date_sql=date_to_sql($date);


$sql="UPDATE ${tblpref}depense SET lib='$lib',fournisseur='$four',prix=$prix,date='$date_sql' WHERE num=$num";
mysql_query($sql) OR die("Erreur modification depense<br/>$sql<br/>" . mysql_error());
header("Location: dep_lister.php?message=Dépense modifiée");

?>
